class CPU {
    int speed = 2200;

    void getSpeed() {
        System.out.println("cpu速度："+speed);
    }

    void setSpeed(int a) {
        this.speed = a;

    }
}

class HardDisk {
    int amount = 200;

    void getAmount() {
        System.out.println("硬盘容量："+amount);
    }

    void setAmount(int a) {
        this.amount = a;

    }
}

class PC {
    CPU cpu = new CPU();
    HardDisk HD = new HardDisk();

    void setCPU(CPU c) {
        cpu = c;
    }

    void setHardDisk(HardDisk h) {
        HD = h;
    }

    void show() {
        cpu.getSpeed();
        HD.getAmount();
    }
}

public class Test {
    public static void main(String[] args) {
        PC pc = new PC();
        CPU cpu = new CPU();
        cpu.speed = 5000;
        HardDisk HD = new HardDisk();
        HD.amount = 900;
        pc.setCPU(cpu);
        pc.setHardDisk(HD);
        pc.show();

    }
}